{% extends "learning_logs/base.html" %}
{% load bootstrap3 %}

{% block header %}
<h2>添加一个主题:</h2>
{% endblock header %}


{% block content %}
	<form action="{% url 'learning_logs:new_topic' %}" method="POST" class="form">
		<!-- 用来防止跨站请求伪造 -->
		{% csrf_token %}	
		<!-- Django会自动创建表单所需的全部字段 修饰符as_p让Django以段落格式渲染所有表单元素-->
		<!-- {{ form.as_p }} -->
		{% bootstrap_form form%}
		{% buttons %}
		<button name="submit">添加主题</button>
		{% endbuttons %}
	</form>
{% endblock content %}